import Mock from 'mockjs';
import login from './data/login';
import getLoginInfo from './data/getLoginInfo';
import getProblemList from './data/getProblemList';
import submitCode from './data/submitCode';
import getSolutionList from './data/getSolutionList';
import getContestList from './data/getContestList';
import getProblemStatus from './data/getProblemStatus';

Mock.setup({
    timeout:1000
});

Mock.mock(/\/api\/v1\/login/,login);
Mock.mock(/\/api\/v1\/getLoginInfo/,getLoginInfo);
Mock.mock(/\/api\/v1\/getProblemList/,getProblemList);
Mock.mock(/\/api\/v1\/submitCode/,submitCode);
Mock.mock(/\/api\/v1\/getSolutionList/,getSolutionList);
Mock.mock(/\/api\/v1\/getContestList/,getContestList);
Mock.mock(/\/api\/v1\/getProblemStatus/,getProblemStatus);
Mock.mock(/\/api\/v1\/getMessage/,()=>{
    return {
        statusCode:1,
        message:"获取成功",
        data:[
            {
                id:100,//公告id
                title:"消息",//公告标题
                contest_id:1,//竞赛id +1.0.1
                in_date:"2019-01-02 11:00:00",//添加时间
                update_date:"2019-01-02 11:00:00",//更新时间
                user_id:100,//发布用户id
                username:"admin",//发布的用户名
                content:"新版发布",//内容
            }
        ]
    }
});
Mock.mock(/\/api\/v1\/getContestList/,()=>{
    return {
        statusCode:1,
        message:"获取成功",
        data:[
            {
                contest_id:10, //竞赛id
                title:"ACM大赛", //竞赛标题
                description:"非常BUF", //描述
                start_time:"2019-10-09 17:13:00", //开始时间
                end_time:"2019-10-09 17:15:00", //结束时间
                defunct:0, //是否屏蔽
                is_public:0, //是否公开 -+1.0.1
                notice:"",//比赛须知 +1.0.1
                award:"[]",//比赛奖励 +1.0.1
                /*
                    tempate:
                    [
                        {
                            text:String,//说明
                            poi:Number,//奖励积分
                        }
                    ]
                */
                flow:"[]",//比赛流程 +1.0.1
                /*
                    tempate:
                    [
                        {
                            text:String,//说明
                            date:DateString,//时间
                        }
                    ]
                */
            }
        ]
    }
});